package com.yyq.sos.service;

import java.io.Serializable;
import java.util.List;

import org.hibernate.SessionFactory;

import com.yyq.sos.dao.BaseDao;
import com.yyq.sos.util.page.PageFormData;

public interface BaseBpo{
	void beginTransaction();
	void commitTransaction();
	void setBaseDao(BaseDao dao);
	Class getPojoClass();
	List list();
	List list(int page,int size);
	PageFormData listPage(int page,int size);
	PageFormData searchPage(String hql,int page,int size);
	PageFormData searchPage(String[] fields,String[] values,int page,int size);
	List search(String[] fields,String[] values,int page,int size);
	List search(String hql,int page,int size);
	List search(String hql);
	List search(String[] fields,String[] values);
	Serializable save(Object obj);
	Serializable[] save(Object[] objs);
	long count();
	long count(String hql);
	boolean delete(long id);
	boolean delete(java.io.Serializable id);
	boolean delete(Object obj);
	boolean delete(long[] ids);
	boolean delete(java.io.Serializable[] ids);
	boolean delete(String hql);
	Object findByPk(long id);
	Object findByPk(java.io.Serializable id);
	boolean update(Object[] objs);
	boolean update(Object obj);
	boolean update(String hql);
	boolean exist(String hql);
	boolean exist(java.io.Serializable id);
	public Object max(String fieldName,String where);
	boolean execSql(String sql);
	boolean execHql(String sql);
	List searchSql(String sql);
	PageFormData searchSqlPage(String sql,int page,int size);
	public boolean validDate(String valueCondition,String effDate,String expDate);
	SessionFactory getSessionFactory();
	void setCls(Class cls);
	String getTableName(Class cls);
	boolean logicDelete(Serializable[] ids);
	String getOrderByDescStr();
}
